﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.burry.services.UserService" %>

<%
	Map userInfo = (Map)session.getAttribute("userInfo");
	UserService us = new UserService();
	Integer id = (Integer)userInfo.get("id");
	List resultList = us.getUserAddress(id.toString());
%>
<html>
	<head>
	</head>
	<body>
		<table>
			<tr>
				<td>收货人姓名</td>
				<td>地址</td>
				<td>联系方式</td>
				<td>邮编</td>
				<td>操作</td>
			</tr>
			
			<%
				for(int i=0;i<resultList.size();i++){
					Map tmp = (Map)resultList.get(i);
					
				
			%>
			<tr>
				<td><%=tmp.get("man_name")%></td>
				<td><%=tmp.get("address")%></td>
				<td><%=tmp.get("man_tel")%></td>
				<td><%=tmp.get("man_code")%></td>
				<td><input type="button" onclick="javascript:location.href = 'delAddress.jsp?id=<%=tmp.get("id")%>'" value="删除" /></td>
			</tr>
			<%
				}
			%>
		</table>
		
		<div>
			<input type="button" onclick="javascript:location.href = 'addAddress.jsp'" value="新增" />
			
		</div>
	</body>
</html>